// 数字人相关类型定义
export interface MetahumanStartReq {
  avatarId: string;
  appId: string;
}

export interface MetahumanStartRes {
  taskId: string;
  message: string;
  metahumanUrl: string;
}

export interface MetahumanCheckRes {
  taskId: number;
  status: string;
  message: string;
  metahumanUrl: string;
  coturnUrl: string;
}

export interface MetahumanStopRes {
  status: string;
  coturnUrl: string;
  metahumanUrl: string;
}

export interface MetahumanPermissionConfig {
  metahumanPermission: boolean;
  metahumanEnabled: boolean;
  metahumanQuota: boolean;
  avatarId: string;
  speakerId: string;
  previewAvatarUrl: string;
  avatarName: string;
  speakerName: string;
}

export interface MetahumanPermissionConfigUpdateReq {
  metahumanEnabled: boolean;
  avatarId: string;
  speakerId: string;
}

export interface MetahumanAvatar {
  avatarId: string;
  name: string;
  description: string;
  previewAvatarUrl: string;
  voiceOption: {
    speakerId: string;
    name: string;
    previewVoiceUrl: string;
  }[];
}

export interface MetahumanAvatarsRes {
  avatars: MetahumanAvatar[];
}

// 数字人资源信息
export interface MetahumanResource {
  appId: string;
  appName: string;
  appDescription: string;
  appAvatar: string;
  maxConnections: number;
  activeConnections: number;
}

// 数字人连接状态响应
export interface MetahumanConnectionStatusRes {
  resources: MetahumanResource[];
}

// 数字人权限状态响应
export interface MetahumanPermissionStatusRes {
  resources: MetahumanResource[];
}

// 创建数字人权限请求
export interface MetahumanPermissionCreateReq {
  appIds: string[];
  maxConnections: number;
}

// 更新数字人权限请求
export interface MetahumanPermissionUpdateReq {
  appId: string;
  maxConnections: number;
}

// 删除数字人权限请求
export interface MetahumanPermissionDeleteReq {
  appId: string;
}

// 数字人权限操作响应
export interface MetahumanPermissionRes {
  success: boolean;
  message: string;
}

// 数字人连接限制响应
export interface MetahumanConnectionLimitRes {
  limit: number;
  default: number;
}

// 全局数字人资源权限配置请求
export interface MetahumanGlobalPermissionUpdateReq {
  metahumanEnabled: boolean;
}

// 全局数字人资源权限配置响应
export interface MetahumanGlobalPermissionUpdateRes {
  success: boolean;
  message: string;
}

// 全局数字人资源权限状态响应
export interface MetahumanGlobalPermissionStatusRes {
  metahumanGlobalEnabled: boolean;
}

// TURN凭证响应
export interface MetahumanTurnCredentialsRes {
  metahumanTurnCredentials: string;
}

export enum MetahumanApi {
  Start = '/metahuman/start',
  Check = '/metahuman/check',
  Stop = '/metahuman/stop',
  PermissionConfig = '/metahuman/app/permission/config',
  Avatars = '/metahuman/avatars',
  ConnectionStatus = '/metahuman/resource/connection/status',
  PermissionStatus = '/metahuman/resource/permission/status',
  PermissionCreate = '/metahuman/resource/permission/create',
  PermissionUpdate = '/metahuman/resource/permission/update',
  PermissionPermissionUpdate = '/metahuman/app/permission/config/update',
  PermissionDelete = '/metahuman/resource/permission/delete',
  ConnectionLimit = '/metahuman/resource/connection/limit',
  GlobalPermissionUpdate = '/metahuman/resource/permission/global/update',
  GlobalPermissionStatus = '/metahuman/resource/permission/global/status',
  TurnCredentials = '/metahuman/turn/credentials',
}

export enum TabKeys {
  USAGE = 'usage',
  PERMISSION = 'permission',
}
